# -*- coding: utf-8 -*-

import uuid
import shortuuid
import tinify

tinify.key = "pvIxW5MjpWlwrSm2IbioYalz8JcFTqvX"

def compress(filename):
    source = tinify.from_file(filename)
    source.to_file("/Users/os/Downloads/wechat_sogou_crawl-master/wechatsogou/wxspider/JWGtBRreJ4iwM6XhnLMuYACeiDCNjgP5150184049486.jpeg")
    print "Done"


if "__name == __main__":
    compress("/Users/os/Downloads/wechat_sogou_crawl-master/wechatsogou/wxspider/JWGtBRreJ4iwM6XhnLMuYACeiDCNjgP5150184049486.jpeg")